﻿using Microsoft.EntityFrameworkCore;
using MyProduce.Produce;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace MyProduce.EntityFrameworkCore;

[ConnectionStringName(MyProduceDbProperties.ConnectionStringName)]
public class MyProduceDbContext : AbpDbContext<MyProduceDbContext>, IMyProduceDbContext
{
    /* Add DbSet for each Aggregate Root here. Example:
     * public DbSet<Question> Questions { get; set; }
     */
    public DbSet<Breedingpattern> Breedingpattern { get; set; }//配种方式
    public DbSet<Camp> Camps { get; set; }//转舍
    public DbSet<EweBreeding> EweBreedings { get; set; }//配种
    public DbSet<Growthstage> Growthstages { get; set; }//生长阶段
    public DbSet<Presence> Presences { get; set; }//在场状态
    public DbSet<RoundType> RoundTypes { get; set; }//转舍类型
    public DbSet<SheepManagement> SheepManagements { get; set; }//羊只档案
    public DbSet<Germlinehistoryrecords> Germlinehistoryrecords { get; set; }//种母历史记录
    public DbSet<Pregnancytestresult> Pregnancytestresult { get; set; }//妊检结果
    public DbSet<Prenatal> Prenatal { get; set; }//种母妊检
    public DbSet<Seedbirth> Seedbirth { get; set; }//分娩
    public DbSet<Seedweaning> Seedweaning { get; set; }//种母断奶
    public DbSet<Weaned> Weaned { get; set; }//羔羊断奶
    public DbSet<Transplanting> Transplanting { get; set; }//转种
    public DbSet<Birth> BirthName { get; set; }//出生状态
    public MyProduceDbContext(DbContextOptions<MyProduceDbContext> options)
        : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureMyProduce();
    }
}
